package net.adriana;

import net.adriana.bean.Column;
import net.adriana.bean.Schema;
import net.adriana.bean.Table;
import net.adriana.component.MyFrame;
import net.adriana.ui.FirstWindow;
import net.adriana.ui.LastWindow;
import net.adriana.ui.SecondWindow;

public class Fac {
	
	public static Schema schema;
	public static Table[] tables;
	public static Column[][] cols;
	public static FirstWindow first;
	public static SecondWindow second;
	public static LastWindow last;
	public static MyFrame currentWindow;
	public static String filePath;
	public static String packageName;
	public static boolean isDone;
	public static boolean isError;
	
	public static void init(){
		isDone = false;
		isError = false;
		second = null;
		last = null;
		tables = schema.getTables();
		cols = new Column[tables.length][];
		for (int i = 0; i < tables.length; i++) {
			tables[i].init();
			cols[i] = tables[i].getCols();
			for (Column col : cols[i]) {
				col.setAnnoName("");
				col.setAnnoValue(col.getColName());
				col.setAnnoPattern("");
				col.setAnnoMassege("");
				col.setStdColName();
				col.setStdTypeName();
			}
		}
	}
}
